package com.yenlien.traceyun.business.entity;

import com.yenlien.traceyun.business.trace.Trace;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @author: bigwangy@sina.com
 * @create: 2020-11-24
 * @description:基地
 **/

@Entity
@Table(name = "t_base_soil")
@Trace(stepName = "basesoil", order = 0)
public class BaseSoil extends TraceScanEntity {

    @Column(name = "name", length = 50)
    private String name;                //名称
    @Column(name = "area", length = 50)
    private String area;                //面积
    @Column
    private int type;  //类型(1:基地，2：地块，3：仓库，4：建筑，5：全景图,6:养殖区域) type = 6 是绑定传感器  新建地块上的图标后进行绑定   type=7是绑定摄像头设备
                        // 8=土壤墒情   9=水质设备  10=虫情监控  11=杀虫灯

    @Column(name = "color", length = 50)
    private String color;                //颜色
    @Column(name = "diaphaneity", length = 50)
    private String diaphaneity;            //透明度
    @Column(name = "peasant_id", length = 32)
    private String peasantId;            //农户ID
    @Column(name = "peasant_name", length = 50)
    private String peasantName;            //农户姓名
    @Column(name = "principal_id", length = 32)
    private String principalId;            //种植管理员ID
    @Column(name = "principal_name", length = 50)
    private String principalName;        //种植管理员姓名
    @Column(name = "coordinate", length = 2000)
    private String coordinate;            //坐标
    @Column(name = "soil_img", length = 50)
    private String soilImg;                //地块全景图
    @Column(name = "img_time", length = 50)
    private String imgTime;                //拍摄时间
    @Column
    private boolean isDelete;                //是否存在(0:存在，1：已删除)
    @Column
    private String pid;                    //所属上级
    @Column(name = "jy_img", length = 50)
    private String jyImg;           //种植的济源图片                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    @Transient
    private List<Equipment> equipmentList;  // 地块ID


    @Column(name = "app_id", length = 50)
    private String appId; //应用

    @Transient
    private String status;          //地块状态（1：种植中，0：未种植）

    @Transient
    private String accessToken; // 该设备Token
    @Transient
    private String devStatus;  // 在线状态：0-不在线，1-在线
    @Transient
    private List<BaseSoil> plotList;  // 基地所属地块


    public List<BaseSoil> getPlotList() {
        return plotList;
    }
    public void setPlotList(List<BaseSoil> plotList) {
        this.plotList = plotList;
    }

    public List<Equipment> getEquipmentList() {
        return equipmentList;
    }

    public void setEquipmentList(List<Equipment> equipmentList) {
        this.equipmentList = equipmentList;
    }
    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }

    public String getDevStatus() {
        return devStatus;
    }

    public void setDevStatus(String devStatus) {
        this.devStatus = devStatus;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getDiaphaneity() {
        return diaphaneity;
    }

    public void setDiaphaneity(String diaphaneity) {
        this.diaphaneity = diaphaneity;
    }

    public String getPeasantId() {
        return peasantId;
    }

    public void setPeasantId(String peasantId) {
        this.peasantId = peasantId;
    }

    public String getPeasantName() {
        return peasantName;
    }

    public void setPeasantName(String peasantName) {
        this.peasantName = peasantName;
    }

    public String getPrincipalId() {
        return principalId;
    }

    public void setPrincipalId(String principalId) {
        this.principalId = principalId;
    }

    public String getPrincipalName() {
        return principalName;
    }

    public void setPrincipalName(String principalName) {
        this.principalName = principalName;
    }

    public String getCoordinate() {
        return coordinate;
    }

    public void setCoordinate(String coordinate) {
        this.coordinate = coordinate;
    }

    public String getSoilImg() {
        return soilImg;
    }

    public void setSoilImg(String soilImg) {
        this.soilImg = soilImg;
    }

    public String getImgTime() {
        return imgTime;
    }

    public void setImgTime(String imgTime) {
        this.imgTime = imgTime;
    }


    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getJyImg() {
        return jyImg;
    }

    public void setJyImg(String jyImg) {
        this.jyImg = jyImg;
    }

    public boolean isDelete() {
        return isDelete;
    }

    public void setDelete(boolean delete) {
        isDelete = delete;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "BaseSoil{" +
                "name='" + name + '\'' +
                ", coordinate='" + coordinate + '\'' +
                '}';
    }
}
